import 'package:json_annotation/json_annotation.dart';
import 'video_model.dart';
import 'image_model.dart';
part 'story_model.g.dart';

@JsonSerializable()
class StoryModel {
  String create_time;
  String desc;
  int id;
  int n_items;
  String name;
  VideoModel square_video;
  ImageModel cover_image;
  String update_time;
  int watch_type;

  StoryModel(
      this.create_time,
      this.desc,
      this.id,
      this.n_items,
      this.name,
      this.square_video,
      this.cover_image,
      this.update_time,
      this.watch_type);

  factory StoryModel.fromJson(Map<String, dynamic> json) =>
      _$StoryModelFromJson(json);

  Map<String, dynamic> toJson() => _$StoryModelToJson(this);
}